<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class UsersOrders extends Model
{
    protected $table = 'users_orders';

    public function user(){
        return $this->hasOne('App\User', 'id', 'uid');
    }

    public function store(){
        return $this->hasOne('App\Store', 'id', 'store_id');
    }

    public function storeInfo(){
        return $this->hasOne('App\StoresInfo', 'id', 'store_info_id');
    }

    public function subsidy(){
        return $this->hasOne('App\Subsidy', 'id', 'sub_id');
    }

    public function storeUser(){
        return $this->hasOne('App\User', 'id', 'store_uid');
    }
}
